package com.xiaoshuidi.cloud.module.report.dal.mapper.report;

import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.report.dal.DO.report.ReportCircleFeeDO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.time.LocalDate;
import java.util.List;

@Mapper
@InterceptorIgnore(tenantLine = "true")
public interface ReportCircleFeeMapper extends BaseMapperX<ReportCircleFeeDO> {

    @Select("select * from report_circle_fee " +
            " where contract_id = #{contractId} and start_time <= #{date} and end_time >= #{date}")
    List<ReportCircleFeeDO> selectByContractIdAndTime(@Param("contractId")Long contractId, @Param("date")LocalDate date);
}
